import org.junit.Before;
import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

public class InputParserTest {
    InputParser inputParser;
    @Before
    public void setUp(){
        inputParser = new InputParser("Regular: 16Mar2009(mon), 17Mar2009(tues), 18Mar2009(wed)");
    }

    @Test
    public void shouldReturnRegularCustomerTypeWithCorrectInput(){
        assertThat(inputParser.customerType(), is("Regular"));
    }
    @Test
    public void shouldReturnReservedCustomerTypeWithCorrectInput(){
        inputParser = new InputParser("Reserved: 16Mar2009(mon), 17Mar2009(tues), 18Mar2009(wed)");
        assertThat(inputParser.customerType(), is("Reserved"));
    }

    @Test
    public void shouldReturnListOfWeekendOrWeekDay(){
        assertThat(inputParser.dayList().get(0), is("weekday"));
        assertThat(inputParser.dayList().get(1), is("weekday"));
        assertThat(inputParser.dayList().get(2), is("weekday"));
        inputParser = new InputParser("Reserved: 16Mar2009(fri), 17Mar2009(sat), 18Mar2009(sun)");
        assertThat(inputParser.dayList().get(0), is("weekday"));
        assertThat(inputParser.dayList().get(1), is("weekend"));
        assertThat(inputParser.dayList().get(2), is("weekend"));
    }
}
